package com.bdqn.vueboot.util;

import cn.hutool.core.lang.UUID;

import java.util.Random;

public class UuidUtil {
    public static long uniqId() {
        Random random= new Random();
        String nanoRandom = System.nanoTime() + "" + random.nextInt(99999);
        int hash = Math.abs(UUID.randomUUID().hashCode());
        int needAdd = 19 - String.valueOf(hash).length() + 1;
        return Long.valueOf(hash + "" + nanoRandom.substring(needAdd));
    }

}
